import React from 'react';

interface TaskProps {
  task: {
    id: number;
    title: string;
    state: string; // 这里的类型可能需要根据实际需求调整
  };
  onArchiveTask: (id: number) => void;
  onPinTask: (id: number) => void;
}

const Task: React.FC<TaskProps> = ({ task: { id, title, state } }) => {
  return (
    <div className={`list-item ${state}`}>
      <input
        key={id}
        type="text"
        value={title}
        readOnly={true}
        name="title"
        aria-label={title}
        aria-readonly={true}
      />
    </div>
  );
};

export default Task;
